/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package an_semantico;

import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.PrintStream;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author fernando
 */
public class AnSemanticoFactory {

    public AnSemantico criaSemantico(String output_path){

        PrintStream out = null;
        try {
            AnSemantico anSemantico = new AnSemantico();
            out = new PrintStream(output_path);
            anSemantico.setOut(out);
            return anSemantico;
        } catch (FileNotFoundException ex) {
            Logger.getLogger(AnSemanticoFactory.class.getName()).log(Level.SEVERE, null, ex);
            throw new Error("Cannot Open Output File!!!");
        }
    }
}
